package com.example.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.system.dto.TenantParam;
import com.example.system.entity.Tenant;
import com.example.system.vo.TenantVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 *
 * @author 王令
 * @since 2022-10-21
 */
public interface TenantMapper extends BaseMapper<Tenant> {

    void addWithAuthorityJoins(@Param("tenantId") String tenantId, @Param("authoritiesId") List<Long> authoritiesId);

    void removeWithAuthorityJoins(String tenantId);

    Page<TenantVo> listWithPaginationExcludeMaster(IPage<Tenant> page, @Param("master") String master, @Param("param")
            TenantParam param);

    List<Long> listAuthorityIdByTenantId(String tenantId);


}
